<?php
	class HangAction extends BaseAction{
		public function index(){
			import("ORG.Util.Page");
			$count = M("new")->count();
			$page = new Page($count,25);
			$show = $page->show();
			$lists = M("news")->join("newstype ON newstype.id=news.type" )->select();
			$this->assign("result",$lists);
			$this->assign("page",$show);

			//精品写字楼
			$xjingpin = M("xiezilou")->join("area ON xiezilou.x_quyu = area.a_id")->join("rent ON rent.r_id = xiezilou.x_zulin")->where("is_jingpin=1")->select();
			$this->assign("xjingpin",$xjingpin);


			//精品商铺
			$sjingpin = M("shangpu")->join("area ON shangpu.s_quyu = area.a_id")->join("rent ON rent.r_id = shangpu.s_zulin")->where("is_jingpin=1")->select();
			$this->assign("sjingpin",$sjingpin);


			//热点新闻
			$news = M("new")->join("newtype ON newstype.id=news.type" )->where("type_name = '热点新闻'")->select();
			$this->assign("hotnew",$news);
			$this->display();
		
		
		}
	
	
	}

?>